{% extends "hometeacher.html" %}

{% block title %}{{ question.name }}{% endblock %}

{% block teachercontent %}
    <p>Question: {{ question.name }}</p>

    <a class="deletelink" href="/Exam/?/{{ obj.id }}">Delete</a>
    <a class="changelink" href="/Exam/?/{{ obj.id }}">edit</a>

    <p>
        <a class="addlink" href="/Exam/AddAnswer?/{{ obj.id }}">Add Answer</a>
    </p>
    <ul>
        {% for item in answers %}
            <li>
                <p>Answer: {{ item.answer }}</p>
                {% if item.correct %}
                    <p>Correct answer</p>
                {% endif %}
            </li>
            <a class="deletelink" href="/Exam/Question/DeleteAnswer/{{ item.id }}">Delete</a>
            <a class="changelink" href="/Exam/Question/EditAnswer/{{ item.id }}">edit</a>
        {% endfor %}
    </ul>

{% endblock %}